You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: replace authoritative preview values so resets remove old overrides - #8
A preview reset can clear its saved values while leaving an old setting deployed. argocd-promote-helm always deep-merges previous Application runtime values back into the fresh chart render, so a removed key is resurrected. This was reproduced with a live Auth preview: reset resolved both app refs to latest, but env.PREVIEW_VALUES_SMOKE remained in the committed GitOps manifest and running process.
Add merge_existing_values: false for callers whose rendered values are authoritative. Replacement removes omitted keys and writes an empty map when resetting to chart defaults. The default remains true, preserving existing release/preview callers' merge behavior. Generic chart-values previews will opt out of merging; no existing caller changes implicitly.
Four subprocess regressions run the actual workflow step: default preservation/override, authoritative omission removal, empty replacement and default empty-map no-op. They pass locally, with a new PR CI job. Live candidate verification passed: Auth #57 promoted with replacement mode and a cleared reset overlay; Ready revision harmony-auth-00007 ran image pr-57-ba26e43c4ade957b13c967e6798b8abf095f16dd with process.env.PREVIEW_VALUES_SMOKE absent, replacing revision 6 where it was live-command-1. The four regression cases and upstream preview/release dry-run checks pass. This is a dependency of gitkb/workflows #24 and Auth #57/Site #96.
No actionable comments were generated in the recent review.
Walkthrough
The promotion workflow adds an optional input to select whether existing Helm values are merged with newly rendered values. A new pull-request job runs regression tests for merge, replacement, and empty-value cases.
Changes: Helm Values Merge Control
Layer / File(s)
Summary
Configure and validate Helm values merging .github/workflows/argocd-promote-helm.yaml, .github/workflows/on-pr.yaml, tests/test_values_merge.py
The promotion workflow adds merge_existing_values, which defaults to true. When enabled, new values take precedence in the merge. When disabled, the workflow uses only new values and marks them for replacement, including when the result is {}. Empty or null results become {}. The pull-request workflow runs regression tests for four persisted-values scenarios.
The change adds an optional switch so callers can replace Helm values instead of merging them. The default behavior is unchanged. No concrete merge-blocking risk was identified. Live consumer verification is still pending, as the PR notes.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the workflow now replaces authoritative preview values, so resets remove old overrides. The PR objectives add a merge_existing_values input that defaults to true and i…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check
Explanation
The title names the main change: the workflow now replaces authoritative preview values, so resets remove old overrides. The PR objectives add a merge_existing_values input that defaults to true and is set to false for authoritative callers. The title uses a conventional fix: prefix and is specific enough for a teammate scanning history to understand the primary change.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: c809dff5-c1bf-4cb7-a85e-66f94756a847
Commits
Reviewing files that changed from the base of the PR and between 374cdc4 and e3cb2d0.
Files selected for processing: 3
.github/workflows/argocd-promote-helm.yaml
.github/workflows/on-pr.yaml
tests/test_values_merge.py
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A preview reset can clear its saved values while leaving an old setting deployed.
argocd-promote-helmalways deep-merges previous Application runtime values back into the fresh chart render, so a removed key is resurrected. This was reproduced with a live Auth preview: reset resolved both app refs to latest, butenv.PREVIEW_VALUES_SMOKEremained in the committed GitOps manifest and running process.Add
merge_existing_values: falsefor callers whose rendered values are authoritative. Replacement removes omitted keys and writes an empty map when resetting to chart defaults. The default remains true, preserving existing release/preview callers' merge behavior. Generic chart-values previews will opt out of merging; no existing caller changes implicitly.Four subprocess regressions run the actual workflow step: default preservation/override, authoritative omission removal, empty replacement and default empty-map no-op. They pass locally, with a new PR CI job. Live candidate verification passed: Auth #57 promoted with replacement mode and a cleared reset overlay; Ready revision
harmony-auth-00007ran imagepr-57-ba26e43c4ade957b13c967e6798b8abf095f16ddwithprocess.env.PREVIEW_VALUES_SMOKEabsent, replacing revision 6 where it waslive-command-1. The four regression cases and upstream preview/release dry-run checks pass. This is a dependency of gitkb/workflows #24 and Auth #57/Site #96.